<template name='dtalk'>
    <div class="ui container">
        <form class='searchUserForm wid-ful'>
            <div class="ui left icon input">
                <input id='dtalkSearch' type="text" name='search' placeholder="{{ translate 'DTALK_SEARCH' }}" autocomplete="off">
                {{#if searchUserKey}}
                    <i class="checkmark green icon"></i>
                {{else}}
                    <i class="users icon"></i>
                {{/if}}
            </div>
            <input type="hidden" value="{{searchUserKey}}" name='searchResult'>
        </form>
        <h2 class="mb-2">{{ translate 'DTALK_LIST'}}</h2>

        {{#unless hasPublishedKey}}
            <a href='{{publishUrl}}' target="_blank" class="ui red dtube button subscribe" tabindex="0">
                <div style="display:inline-block;padding: 0.8em 1em;">
                    {{ translate 'DTALK_OPT_IN'}}
                </div>
            </a>
        {{/unless}}

        {{#each conversations}}
            <div>
                <a href='/dtalk/{{pub}}'>
                    <img class="ui avatar image" src="{{userPic alias.username}}">
                    {{alias.username}}
                </a>
            </div>
        {{/each}}
    </div>
</template>